package com.paul.task;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * Created by yangjianbo on 2016/3/8.
 */
@Component
public class TestTask {
    @Scheduled(cron = "0/5 * * * * ?")
    public void testwork(){
        System.out.println(Thread.currentThread().getName()+" "+"work1: 每5秒执行一次");
    }
}
